home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 55 / MOBICLIC 55.ISO / DATA / MOBICLUB / MEDIATTI.CST / 00015_Script_loop + relance < prev    next >
Text File  |  2003-06-26  |  1KB  |  47 lines

  1. property pTicks,pDone,pSon,pTemps
  2. --xxxxxxxxxxx
  3. on getBehaviorDescription me
  4.   return \
  5.     "Lance un comment de relance au bout d'un certain temps."
  6. end getBehaviorDescription
  7. --xxxxxxxxxxx
  8. on getBehaviorTooltip me
  9.   return \
  10.     "Indiquer quel comment doit etre lancΘ et au bout de combien de temps."
  11. end getBehaviorTooltip
  12. --xxxxxxxxxxx
  13. on getPropertyDescriptionList
  14.   vPDList = [:]
  15.   setaProp vPDList, #pSon, [#comment: "Quel comment de relance doit etre jouΘ ?", \
  16.     #format: #string, #default: the moviename.char[1..4]]
  17.   setaProp vPDList, #pTemps, [#comment: "Au bout de combien de temps en secondes ?", \
  18.     #format: #integer, #default: 5,#range:[#min:1,#max:15]]
  19.   return vPDList
  20. end getPropertyDescriptionList
  21. --xxxx
  22. on beginsprite
  23.   pTicks = the ticks
  24.   pDone = 0
  25. end
  26. --xxxx
  27. on exitFrame me
  28.   
  29.   if sprite(150).visible = 0 then
  30.     if the ticks >= (pTicks + pTemps*60) and pDone = 0 then
  31.       joueson pSon
  32.       pDone = 1
  33.     end if
  34.     
  35.     if Soundbusy(3) = 0 and pDone = 1 then
  36.       pTicks = the ticks
  37.       pDone = 0
  38.     end if
  39.   end if
  40.   
  41.   go the frame
  42. end
  43. --xxxx
  44. on initTicks
  45.   pTicks = the ticks
  46.   pDone = 0
  47. end